package com.kgcx.coupon.mapper;

import com.kgcx.coupon.domain.CouponDetail;

import java.util.List;

import org.apache.ibatis.annotations.Param;

public interface CouponDetailMapper {

    int deleteByPrimaryKey(Integer kid);

    int deleteByPlanId(Integer planId);

    int insert(CouponDetail record);

    void insertByBatch(List<CouponDetail> list);

    int insertSelective(CouponDetail record);

    CouponDetail selectByPrimaryKey(Integer kid);

    List<CouponDetail> selectByPlanId(Integer kid);

    List<CouponDetail> selectByPlanIds(List<Long> list);

    int updateByPrimaryKeySelective(CouponDetail record);

    int updateByPrimaryKey(CouponDetail record);

    /**
     * 获取新人策略 type为2
     * @return
     */
    public List<CouponDetail> selectNewStrategy();

    public void deleteByType(@Param("type") Integer type);
}
